<template>
  <div>
    <!-- 列表区域 -->
    <section class="main">
      <ul class="todo-list">
        <li class="todo" v-for="item in list" :key="item.id">
          <div class="view">
            <span class="index">{{item.id}}.</span> <label>{{item.title}}</label>
            <button class="destroy" @click="$emit('delList',item.id)"></button>
          </div>
        </li>
      </ul>
    </section>
  </div>
</template>

<script>
export default {
    props: ['list']
};
</script>

<style lang="sass" scoped></style>
